package com.majsubtense.core.components;

public class ComponentType <T extends Component> {
    public static final ComponentType<Component> ROOT;
    private final ComponentType<? super T> superType;
    private final String name;

    public ComponentType(ComponentType<? super T> superType, String name) {
        this.superType = superType;
        this.name = name;
    }

    public ComponentType<? super T> getSuperType() {
        return superType;
    }

    public String getName() {
        return name;
    }

    static {
        ROOT = new ComponentType<>(null, "COMPONENT");
    }
}
